Use a cleaner fix for the game freezing problem on exit