Restore back button functionality