Added if statement based on useVsync