game loop fix