switch to main menu when back press or change directory