Index: sansview/perspectives/fitting/fitpanel.py
===================================================================
--- sansview/perspectives/fitting/fitpanel.py	(revision c9a43773a6a8aabe5aaa2b81bcfbbf72236bf041)
+++ sansview/perspectives/fitting/fitpanel.py	(revision 9853ad069a86f1e21bce16d80f5733f56cfedd79)
@@ -61,18 +61,18 @@
              close page and remove all references to the closed page
         """
-        page_info=self.get_current_page().page_info.clone()
-        page_info.page_name= self.get_current_page().page_info.page_name
-       
-        self.manager._add_page_onmenu(page_info.page_name, page_info)
+        page_info = self.get_current_page().page_info.clone()
+        page_info.page_name = self.get_current_page().page_info.page_name
+        page_finder = self.manager.get_page_finder() 
+        fitproblem = None
+        
+        if self.get_current_page() in page_finder:
+            fitproblem= page_finder[self.get_current_page()]
+            
+        self.manager._add_page_onmenu(page_info.page_name, page_info, fitproblem)
         
         selected_page = self.GetPage(self.GetSelection())
         page_number = self.GetSelection()
+        
         if self.sim_page != selected_page and selected_page!=self.about_page:
-            #remove that page from page_finder of fitting module
-            page_finder=self.manager.get_page_finder() 
-            for page, value in page_finder.iteritems():
-                if page==selected_page:
-                    del page_finder[page]
-                    break
             # remove the check box link to the model name of this page (selected_page)
             if self.sim_page !=None :
@@ -86,4 +86,5 @@
                 self.draw_model_name=None
                 self.model_page=None
+                
             if  page_number == 1:
                 self.model_page=None
@@ -170,12 +171,44 @@
             return None 
         
-    def _help_add_model_page(self,model,page_title, qmin=0, qmax=0.1, npts=50):
-        """
-            #TODO: fill in description
-            
+   
+    def add_model_page(self,model,page_title, qmin=0, qmax=0.1, npts=50, topmenu=False):
+        """
+            Add a model page only one  to display any model selected from the menu or the page combo box.
+            when this page is closed than the user will be able to open a new one
+            
+            @param model: the model for which paramters will be changed
+            @param page_title: the name of the page
+            @param page_title: [Coder: fill your description!]
             @param qmin: mimimum Q
             @param qmax: maximum Q
             @param npts: number of Q points
         """
+        if topmenu==True:
+            if  self.draw_model_name ==None:
+                self._help_add_model_page(model,page_title, qmin=qmin, qmax=qmax, npts=npts)
+            else:
+                self.model_page.select_model(model, page_title)
+        else:
+            self._create_model_page(model,page_title, qmin=qmin, qmax=qmax, npts=npts)
+          
+    def _help_add_model_page(self,model,page_title, qmin=0, qmax=0.1, npts=50):
+        """
+            #TODO: fill in description
+            
+            @param qmin: mimimum Q
+            @param qmax: maximum Q
+            @param npts: number of Q points
+        """
+        self._create_model_page(model,page_title,qmin=qmin, qmax=qmax, npts=npts)
+        # We just created a model page, we are ready to plot the model
+        #self.manager.draw_model(model, model.name)
+        #FOR PLUGIN  for some reason model.name is = BASEcomponent
+        self.manager.draw_model(model)
+    
+    def _create_model_page(self,model,page_title, qmin, qmax, npts):
+        """
+        adding model page occurs here
+        """
+       
         ## storing page info
         from pageInfo import  PageInfo
@@ -201,30 +234,5 @@
         self.model_page.set_range(qmin, qmax, npts)
         
-        # We just created a model page, we are ready to plot the model
-        #self.manager.draw_model(model, model.name)
-        #FOR PLUGIN  for some reason model.name is = BASEcomponent
-        self.manager.draw_model(model)
-        
-     
-        
-    def add_model_page(self,model,page_title, qmin=0, qmax=0.1, npts=50, topmenu=False):
-        """
-            Add a model page only one  to display any model selected from the menu or the page combo box.
-            when this page is closed than the user will be able to open a new one
-            
-            @param model: the model for which paramters will be changed
-            @param page_title: the name of the page
-            @param page_title: [Coder: fill your description!]
-            @param qmin: mimimum Q
-            @param qmax: maximum Q
-            @param npts: number of Q points
-        """
-        if topmenu==True:
-            if  self.draw_model_name ==None:
-                self._help_add_model_page(model,page_title, qmin=qmin, qmax=qmax, npts=npts)
-            else:
-                self.model_page.select_model(model, page_title)
-          
-   
+        
   
    
