diff --git a/programs/demag_gui.py b/programs/demag_gui.py
index <HASH>..<HASH> 100755
--- a/programs/demag_gui.py
+++ b/programs/demag_gui.py
@@ -5025,8 +5025,10 @@ class Demag_GUI(wx.Frame):
         mb = self.GetMenuBar()
         am = mb.GetMenu(2)
         submenu_toggle_mean_display = wx.Menu()
-        lines = ["m_%s_toggle_mean = submenu_toggle_mean_display.AppendCheckItem(-1, '&%s', '%s'); self.Bind(wx.EVT_MENU, self.on_menu_toggle_mean, m_%s_toggle_mean)"%(f.replace(' ',''),f.replace(' ',''),f.replace(' ',''),f.replace(' ','')) for f in self.all_fits_list]
+        f_name = f.replace(' ','').replace('-','_')
+        lines = ["m_%s_toggle_mean = submenu_toggle_mean_display.AppendCheckItem(-1, '&%s', '%s'); self.Bind(wx.EVT_MENU, self.on_menu_toggle_mean, m_%s_toggle_mean)"%(f_name,f_name,f_name,f_name) for f in self.all_fits_list]
 
+        pdb.set_trace()
         for line in lines: exec(line)
 
         am.DeleteItem(am.GetMenuItems()[3])
fixed error with dashed fit names crashing GUI