Fixed game loop thread sleeping error.