vsync and buggfix