moved pause event to avoid stuck on loading screen