Made changes for sync to work.