revert to previous back button handling but check whether backstack is not empty to prevent inability to exit the app