fix bug when vsync disabled