enable/disable items on popup menus correctly (closes #42)