Fixed a bug where Sync would be stuck waiting if done was called at a bad time.