Snapshot and restore fixes