Fix a bug auto-pruning snaps