Works with multiple submenus.