Fixed vsync bug

Vsync now works as intended