Added onResume() loop