fixed back button handling