Some cleanup while waiting for the game loop.