fixed the bug with back button