Fixed bug with first-time sync.