Fixed back button behavior