Fix onBackPressed handler
Merge with master