Changes for vsync
AriesParts Revision (credits ivendor)