fixing main menu functions