Fixed menu_exists function