Fixed incorrect function loops in menus