Fix back button not always working