Index: src/sas/sasgui/perspectives/fitting/basepage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/basepage.py	(revision c8e19964f2dda929ccae8237e7b140a906cdf134)
+++ src/sas/sasgui/perspectives/fitting/basepage.py	(revision 0b1d7d3147254ec63c2d0b67f2bbb7653603a405)
@@ -1106,6 +1106,9 @@
         """
         for key, value in self.master_category_dict.iteritems():
+            formfactor = state.formfactorcombobox.split(":")
+            if isinstance(formfactor, list):
+                formfactor = formfactor[0]
             for list_item in value:
-                if state.formfactorcombobox in list_item:
+                if formfactor in list_item:
                     return self.categorybox.Items.index(key)
         return 0
@@ -1157,8 +1160,7 @@
             category_pos = int(state.categorycombobox)
         except:
-            state.formfactorcombobox = state.formfactorcombobox.lower()
-            state.formfactorcombobox = \
-                state.formfactorcombobox.replace('model', '')
-            state.formfactorcombobox = unicode(state.formfactorcombobox)
+            if state.formfactorcombobox is not None \
+                    and not state._is_sasmodels():
+                state._convert_to_sasmodels()
             state.categorycombobox = unicode(state.categorycombobox)
             if state.categorycombobox in self.categorybox.Items:
@@ -1175,4 +1177,8 @@
             formfactor_pos = int(state.formfactorcombobox)
         except:
+            if self.categorybox.GetValue() == 'Customized Models' \
+                    and '[plug-in]' not in state.formfactorcombobox:
+                state.formfactorcombobox = \
+                    '[plug-in] ' + state.formfactorcombobox
             formfactor_pos = 0
             for ind_form in range(self.formfactorbox.GetCount()):
@@ -1528,5 +1534,5 @@
                         index_data = ((self.qmin_x <= self.data.x) &
                                       (self.data.x <= self.qmax_x))
-                        val = str(len(self.data.x[index_data is True]))
+                        val = str(len([index_data is True]))
                         self.Npts_fit.SetValue(val)
                     else:
@@ -1574,41 +1580,48 @@
         if len(statelist) == 0 or len(listtorestore) == 0:
             return
-        if len(statelist) != len(listtorestore):
-            return
 
         for j in range(len(listtorestore)):
-            item_page = listtorestore[j]
-            item_page_info = statelist[j]
-            # change the state of the check box for simple parameters
-            if item_page[0] is not None:
-                item_page[0].SetValue(item_page_info[0])
-            if item_page[2] is not None:
-                item_page[2].SetValue(item_page_info[2])
-                if item_page[2].__class__.__name__ == "ComboBox":
-                    if item_page_info[2] in self.model.fun_list:
-                        fun_val = self.model.fun_list[item_page_info[2]]
-                        self.model.setParam(item_page_info[1], fun_val)
-            if item_page[3] is not None:
-                # show or hide text +/-
-                if item_page_info[2]:
-                    item_page[3].Show(True)
-                else:
-                    item_page[3].Hide()
-            if item_page[4] is not None:
-                # show of hide the text crtl for fitting error
-                if item_page_info[4][0]:
-                    item_page[4].Show(True)
-                    item_page[4].SetValue(item_page_info[4][1])
-                else:
-                    item_page[3].Hide()
-            if item_page[5] is not None:
-                # show of hide the text crtl for fitting error
-                item_page[5].Show(item_page_info[5][0])
-                item_page[5].SetValue(item_page_info[5][1])
-
-            if item_page[6] is not None:
-                # show of hide the text crtl for fitting error
-                item_page[6].Show(item_page_info[6][0])
-                item_page[6].SetValue(item_page_info[6][1])
+            for param in statelist:
+                if param[1] == listtorestore[j][1]:
+                    item_page = listtorestore[j]
+                    item_page_info = param
+                    if (item_page_info[1] == "theta" or item_page_info[1] ==
+                            "phi") and not self._is_2D():
+                        break
+                    # change the state of the check box for simple parameters
+                    if item_page[0] is not None:
+                        item_page[0].SetValue(item_page_info[0])
+                    if item_page[2] is not None:
+                        # TODO: On loading save state, should try to coerce
+                        # TODO: length and scale params to positive values
+                        item_page[2].SetValue(item_page_info[2])
+                        if item_page[2].__class__.__name__ == "ComboBox":
+                            if item_page_info[2] in self.model.fun_list:
+                                fun_val = self.model.fun_list[item_page_info[2]]
+                                self.model.setParam(item_page_info[1], fun_val)
+                    if item_page[3] is not None:
+                        # show or hide text +/-
+                        if item_page_info[2]:
+                            item_page[3].Show(True)
+                        else:
+                            item_page[3].Hide()
+                    if item_page[4] is not None:
+                        # show of hide the text crtl for fitting error
+                        if item_page_info[4][0]:
+                            item_page[4].Show(True)
+                            item_page[4].SetValue(item_page_info[4][1])
+                        else:
+                            item_page[3].Hide()
+                    if item_page[5] is not None:
+                        # show of hide the text crtl for fitting error
+                        item_page[5].Show(item_page_info[5][0])
+                        item_page[5].SetValue(item_page_info[5][1])
+
+                    if item_page[6] is not None:
+                        # show of hide the text crtl for fitting error
+                        item_page[6].Show(item_page_info[6][0])
+                        item_page[6].SetValue(item_page_info[6][1])
+
+                    break
 
     def _reset_strparam_state(self, listtorestore, statelist):
Index: src/sas/sasgui/perspectives/fitting/pagestate.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/pagestate.py	(revision c8e19964f2dda929ccae8237e7b140a906cdf134)
+++ src/sas/sasgui/perspectives/fitting/pagestate.py	(revision 0b1d7d3147254ec63c2d0b67f2bbb7653603a405)
@@ -25,4 +25,5 @@
 from lxml import etree
 
+from sasmodels import convert
 import sasmodels.weights
 
@@ -355,4 +356,84 @@
             obj.saved_states[copy_name] = copy_state
         return obj
+
+    def _is_sasmodels(self):
+        """
+        A check to see if the loaded save state was saved in SasView v4_0+
+        :return: None
+        """
+        newname = convert._conversion_target(self.formfactorcombobox)
+        if newname == None:
+            return True
+        else:
+            return False
+
+    def _convert_to_sasmodels(self):
+        """
+        Convert parameters to a form usable by sasmodels converter
+
+        :return: None
+        """
+        # Create conversion dictionary to send to sasmodels
+        p = dict()
+        for fittable, name, value, _, uncert, lower, upper, units in \
+                self.parameters:
+            if not value:
+                value = numpy.nan
+            if not uncert or uncert[1] == '':
+                uncert[0] = False
+                uncert[1] = numpy.nan
+            if not upper or upper[1] == '':
+                upper[0] = False
+                upper[1] = numpy.nan
+            if not lower or lower[1] == '':
+                lower[0] = False
+                lower[1] = numpy.nan
+            p[name] = float(value)
+            p[name + ".fittable"] = bool(fittable)
+            p[name + ".std"] = float(uncert[1])
+            p[name + ".upper"] = float(upper[1])
+            p[name + ".lower"] = float(lower[1])
+            p[name + ".units"] = units
+
+        structurefactor, params = \
+            convert.convert_model(self.structurecombobox, p)
+        formfactor, params = \
+            convert.convert_model(self.formfactorcombobox, params)
+        # if len(self.str_parameters) > 0:
+        #     formfactor, str_params = \
+        #         convert.convert_model(formfactor, self.str_parameters)
+
+        # Only convert if old != new, otherwise all the same
+        if formfactor != self.formfactorcombobox or \
+                        structurefactor != self.structurecombobox:
+            self.formfactorcombobox = formfactor
+            self.structurecombobox = structurefactor
+            self.parameters = []
+            for name, info in params.iteritems():
+                if ".fittable" in name or ".std" in name or ".upper" in name or\
+                        ".lower" in name or ".units" in name:
+                    pass
+                else:
+                    fittable = params.get(name + ".fittable", True)
+                    std = params.get(name + ".std", '0.0')
+                    upper = params.get(name + ".upper", 'inf')
+                    lower = params.get(name + ".lower", '-inf')
+                    units = params.get(name + ".units")
+                    if std is not None and std is not numpy.nan:
+                        std = [True, str(std)]
+                    else:
+                        std = [False, '']
+                    if lower is not None and lower is not numpy.nan:
+                        lower = [True, str(lower)]
+                    else:
+                        lower = [True, '-inf']
+                    if upper is not None and upper is not numpy.nan:
+                        upper = [True, str(upper)]
+                    else:
+                        upper = [True, 'inf']
+                    param_list = [bool(fittable), str(name), str(info),
+                                  "+/-", std, lower, upper, str(units)]
+                    self.parameters.append(param_list)
+
 
     def _repr_helper(self, list, rep):
Index: src/sas/sasgui/perspectives/invariant/invariant_state.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_state.py	(revision cb93b405a73e2c9eef55d1ac6f2bbcff2b0b9d6d)
+++ src/sas/sasgui/perspectives/invariant/invariant_state.py	(revision db5294eb167ea87b105d85329af888f2b1a980fd)
@@ -423,5 +423,8 @@
                     for item in DEFAULT_STATE:
                         input_field = get_content('ns:%s' % item, entry)
-                        val = str(input_field.text.strip())
+                        if input_field.text is not None:
+                            val = str(input_field.text.strip())
+                        else:
+                            val = ''
                         if input_field is not None:
                             temp_state[item] = val
@@ -433,5 +436,8 @@
                 for item in DEFAULT_STATE:
                     input_field = get_content('ns:%s' % item, entry)
-                    val = str(input_field.text.strip())
+                    if input_field.text is not None:
+                        val = str(input_field.text.strip())
+                    else:
+                        val = ''
                     if input_field is not None:
                         self.set_saved_state(name=item, value=val)
