Added new onBackPressed functionality