fix a snapshotting bug