fixed bug with sync not parsing files correctly. (string.sub is useless...)