Index: src/sas/dataloader/readers/cansas_constants.py
===================================================================
--- src/sas/dataloader/readers/cansas_constants.py	(revision c43e87502bb7b986692f0d3292e1ae83f2cb5c04)
+++ src/sas/dataloader/readers/cansas_constants.py	(revision 682c432d9d62b6579bcdee8cedf8793d5d84f77b)
@@ -101,5 +101,5 @@
     RUN = {"variable" : "{0}.run.append(\"{1}\")",
            "attributes" : {"name" :
-                           {"variable" : "{0}.run_name[node_value] = \"{1}\""}}
+                           {"variable" : "{0}.run_name[\"{3}\"] = \"{1}\""}}
           }
     SASDATA_IDATA_Q = {"variable" : "{0}.x = numpy.append({0}.x, {1})",
@@ -623,5 +623,5 @@
                       "attributes" : {"name" :
                                       {"variable" :
-                                       "{0}.run_name[node_value] = \"{1}\""}},
+                                       "{0}.run_name[\"{3}\"] = \"{1}\""}},
                       "children" : {"Title" : TITLE,
                                     "Run" : RUN,
Index: src/sas/dataloader/readers/cansas_reader.py
===================================================================
--- src/sas/dataloader/readers/cansas_reader.py	(revision d26dea03dc6672ee5b15cc43e77a7a352c6cbd25)
+++ src/sas/dataloader/readers/cansas_reader.py	(revision 682c432d9d62b6579bcdee8cedf8793d5d84f77b)
@@ -26,9 +26,11 @@
 from sas.dataloader.data_info import Process
 from sas.dataloader.data_info import Aperture
-# Both imports used. Do not remove either.
-from xml.dom.minidom import parseString
 import sas.dataloader.readers.xml_reader as xml_reader
 from sas.dataloader.readers.xml_reader import XMLreader
 from sas.dataloader.readers.cansas_constants import CansasConstants
+
+# The following 2 imports *ARE* used. Do not remove either.
+import xml.dom.minidom
+from xml.dom.minidom import parseString
 
 _ZERO = 1e-16
@@ -47,6 +49,5 @@
 ALLOW_ALL = True
 
-# DO NOT REMOVE
-# Called by outside packages:
+# DO NOT REMOVE Called by outside packages:
 #    sas.perspectives.invariant.invariant_state
 #    sas.perspectives.fitting.pagestate
@@ -62,5 +63,4 @@
     nodes = node.xpath(location,
                        namespaces={'ns': CANSAS_NS.get("1.0").get("ns")})
-
     if len(nodes) > 0:
         return nodes[0]
@@ -68,7 +68,5 @@
         return None
 
-
-# DO NOT REMOVE
-# Called by outside packages:
+# DO NOT REMOVE Called by outside packages:
 #    sas.perspectives.fitting.pagestate
 def write_node(doc, parent, name, value, attr=None):
@@ -93,5 +91,4 @@
     return False
 
-
 class Reader(XMLreader):
     """
@@ -104,8 +101,6 @@
     cansas_version = "1.0"
     base_ns = "{cansas1d/1.0}"
-
     logging = None
     errors = None
-
     type_name = "canSAS"
     ## Wildcards
@@ -113,8 +108,6 @@
     ## List of allowed extensions
     ext = ['.xml', '.XML', '.svs', '.SVS']
-
     ## Flag to bypass extension check
     allow_all = True
-
 
     def __init__(self):
@@ -123,5 +116,4 @@
         self.logging = []
         self.encoding = None
-
 
     def is_cansas(self, ext="xml"):
@@ -141,5 +133,4 @@
         return False
 
-
     def load_file_and_schema(self, xml_file):
         """
@@ -165,5 +156,4 @@
         return cansas_defaults
 
-
     def read(self, xml_file):
         """
@@ -172,5 +162,4 @@
         :param xml_file: A canSAS file path in proper XML format
         """
-
         # output - Final list of Data1D objects
         output = []
@@ -241,5 +230,4 @@
         return None
 
-
     def _final_cleanup(self, data1d):
         """
@@ -260,4 +248,8 @@
         size_dxl = data1d.dxl.size
         size_dxw = data1d.dxw.size
+        if data1d._xunit != data1d.x_unit:
+            data1d.x_unit = data1d._xunit
+        if data1d._yunit != data1d.y_unit:
+            data1d.y_unit = data1d._yunit
         if size_dxl == 0 and size_dxw == 0:
             data1d.dxl = None
@@ -287,5 +279,4 @@
         return name
 
-
     def _unit_conversion(self, node, new_current_level, data1d, \
                                                 tagname, node_value):
@@ -303,4 +294,5 @@
         value_unit = ''
         err_msg = None
+        default_unit = None
         if 'unit' in attr and new_current_level.get('unit') is not None:
             try:
@@ -308,5 +300,4 @@
                 if isinstance(node_value, float) is False:
                     exec("node_value = float({0})".format(node_value))
-                default_unit = None
                 unitname = new_current_level.get("unit")
                 exec "default_unit = data1d.{0}".format(unitname)
@@ -318,7 +309,5 @@
                         data_conv_q = Converter(local_unit)
                         value_unit = default_unit
-                        i_string = "node_value = data_conv_q"
-                        i_string += "(node_value, units=data1d.{0})"
-                        exec i_string.format(unitname)
+                        node_value = data_conv_q(node_value, units=default_unit)
                     else:
                         value_unit = local_unit
@@ -330,8 +319,5 @@
                 err_msg += "\"{0}\" unit [{1}]; "
                 err_msg = err_msg.format(tagname, local_unit)
-                intermediate = "err_msg += " + \
-                            "\"expecting [{1}]\"" + \
-                            ".format(data1d.{0})"
-                exec intermediate.format(unitname, "{0}", "{1}")
+                err_msg += "expecting [{0}]".format(default_unit)
                 value_unit = local_unit
             except:
@@ -347,5 +333,4 @@
         node_value = "float({0})".format(node_value)
         return node_value, value_unit
-
 
     def _check_for_empty_data(self, data1d):
@@ -475,6 +460,8 @@
                     else:
                         attrib_value = node.attrib[key]
-                    store_attr = attrib_variable.format("data1d", \
-                                                    attrib_value, key)
+                    store_attr = attrib_variable.format("data1d",
+                                                        attrib_value,
+                                                        key,
+                                                        node_value)
                     exec store_attr
                 except AttributeError:
@@ -698,20 +685,20 @@
             node.append(point)
             self.write_node(point, "Q", datainfo.x[i],
-                            {'unit': datainfo._xunit})
+                            {'unit': datainfo.x_unit})
             if len(datainfo.y) >= i:
                 self.write_node(point, "I", datainfo.y[i],
-                                {'unit': datainfo._yunit})
+                                {'unit': datainfo.y_unit})
             if datainfo.dy != None and len(datainfo.dy) > i:
                 self.write_node(point, "Idev", datainfo.dy[i],
-                                {'unit': datainfo._yunit})
+                                {'unit': datainfo.y_unit})
             if datainfo.dx != None and len(datainfo.dx) > i:
                 self.write_node(point, "Qdev", datainfo.dx[i],
-                                {'unit': datainfo._xunit})
+                                {'unit': datainfo.x_unit})
             if datainfo.dxw != None and len(datainfo.dxw) > i:
                 self.write_node(point, "dQw", datainfo.dxw[i],
-                                {'unit': datainfo._xunit})
+                                {'unit': datainfo.x_unit})
             if datainfo.dxl != None and len(datainfo.dxl) > i:
                 self.write_node(point, "dQl", datainfo.dxl[i],
-                                {'unit': datainfo._xunit})
+                                {'unit': datainfo.x_unit})
 
     def _write_trans_spectrum(self, datainfo, entry_node):
@@ -895,5 +882,4 @@
                                 {"unit": aperture.distance_unit})
 
-
     def _write_detectors(self, datainfo, instr):
         """
@@ -1038,13 +1024,10 @@
         # Get PIs and create root element
         pi_string = self._get_pi_string()
-
         # Define namespaces and create SASroot object
         main_node = self._create_main_node()
-
         # Create ElementTree, append SASroot and apply processing instructions
         base_string = pi_string + self.to_string(main_node)
         base_element = self.create_element_from_string(base_string)
         doc = self.create_tree(base_element)
-
         # Create SASentry Element
         entry_node = self.create_element("SASentry")
@@ -1054,35 +1037,24 @@
         # Add Title to SASentry
         self.write_node(entry_node, "Title", datainfo.title)
-
         # Add Run to SASentry
         self._write_run_names(datainfo, entry_node)
-
         # Add Data info to SASEntry
         self._write_data(datainfo, entry_node)
-
         # Transmission Spectrum Info
         self._write_trans_spectrum(datainfo, entry_node)
-
         # Sample info
         self._write_sample_info(datainfo, entry_node)
-
         # Instrument info
         instr = self._write_instrument(datainfo, entry_node)
-
         #   Source
         self._write_source(datainfo, instr)
-
         #   Collimation
         self._write_collimation(datainfo, instr)
-
         #   Detectors
         self._write_detectors(datainfo, instr)
-
         # Processes info
         self._write_process_notes(datainfo, entry_node)
-
         # Note info
         self._write_notes(datainfo, entry_node)
-
         # Return the document, and the SASentry node associated with
         #      the data we just wrote
@@ -1090,5 +1062,4 @@
         #      object rather than an lxml object.
         entry_node = self._check_origin(entry_node, doc)
-
         return doc, entry_node
 
Index: src/sas/perspectives/fitting/fitpage.py
===================================================================
--- src/sas/perspectives/fitting/fitpage.py	(revision 2f4b43041eaa7b7f496750f223a299cb33cd268e)
+++ src/sas/perspectives/fitting/fitpage.py	(revision 682c432d9d62b6579bcdee8cedf8793d5d84f77b)
@@ -68,5 +68,5 @@
         #create a default data for an empty panel
         self.create_default_data()
-        #self._manager.frame.Bind(wx.EVT_SET_FOCUS, self.on_set_focus)
+        self._manager.frame.Bind(wx.EVT_SET_FOCUS, self.on_set_focus)
 
     def enable_fit_button(self):
@@ -76,4 +76,13 @@
         flag = check_data_validity(self.data) & (self.model is not None)
         self.btFit.Enable(flag)
+        
+    def on_set_focus(self, event):
+        """
+        Override the basepage focus method to ensure the save flag is set 
+        properly when focusing on the fit page.
+        """
+        flag = check_data_validity(self.data) & (self.model is not None)
+        self._set_save_flag(flag)
+        self.parent.on_set_focus(event)
 
     def _fill_data_sizer(self):
