Fixed a problem with sync; still work to be done