Sync logic changed.

@david-daal