Added listener to onResume instead