[client] Fix a bug in unsync/resync.