Some fixes to syncing.