recover from race condition in interrupted sync
Merge pull request #9 from matiu/bug/recover-in-sync

recover from race condition in interrupted sync