avoid IllegalStateException when using back button to return to main menu