Improved handling of menu item types