Finish Sync code