             // Handle tab hiding/unhiding
             if zplayer.gamekind == kGameTempleTerror || zplayer.gamekind == kGameCitadel {
                 // Add back the Magic tab if necessary
-                if !tabs.tabViewItems.contains(magicTab) {
-                    tabs.insertTabViewItem(heldTabs["magictab"]!, at: 2)
+                if !tabs.tabViewItems.contains(magicTabItem) {
+                    tabs.insertTabViewItem(heldTabs["magicTabItem"]!, at: 2)
                 }
             } else {
                 // Remove the Magic tab
-                heldTabs["magictab"] = magicTab!
-                if tabs.tabViewItems.contains(magicTab) { tabs.removeTabViewItem(magicTab) }
+                heldTabs["magicTabItem"] = magicTabItem!
+                if tabs.tabViewItems.contains(magicTabItem) { tabs.removeTabViewItem(magicTabItem) }
             }
 
             // Handle game-specific stats boxes

        icons.append(image!)
        image = NSImage.init(named: NSImage.Name("icon_herb"))
        icons.append(image!)
        image = NSImage.init(named: NSImage.Name("icon_chalice"))
        icons.append(image!)
        image = NSImage.init(named: NSImage.Name("icon_gem"))

        image = NSImage.init(named: NSImage.Name("icon_tankard"))
        icons.append(image!)
        image = NSImage.init(named: NSImage.Name("icon_fruit"))
        icons.append(image!)
        image = NSImage.init(named: NSImage.Name("icon_fungus"))
        icons.append(image!)

        // House of Hell specific icons
