Fixed main menu and navmenu code