Fix a bug that SnapshotMaker hangs.