game loop fixes