Updates to sync code