Fix crash when pressing back button after using camera