Whenever going to the Settings and then back to the MainActivity and then press the home button and then entering the app again, the app crashes and I get error message java