changed some lines in OnResume