Fixes in the sync code.