sdl freeze correction