Minor fixes to the sync system