fixed crash with back button