Fix recovery from failed sync.