Fix back button behavior