Properly handles back button and works on android without any issues.