fixed main menu loop