Fix onResume problem