fixed so the pygame window now closes correctly