Fix a minor bug when filtering snapshots