Small changes for activityStopped logic