diff --git a/downloads-generation/data_mass_spec_benchmark/run_mhcflurry.py b/downloads-generation/data_mass_spec_benchmark/run_mhcflurry.py
index 8eeb45f208721a1a55267f8279a38b0f3e203e4f..435a6046ff96a115974f0065d8860d2464c04e86 100644
--- a/downloads-generation/data_mass_spec_benchmark/run_mhcflurry.py
+++ b/downloads-generation/data_mass_spec_benchmark/run_mhcflurry.py
@@ -108,7 +108,7 @@ def run(argv=sys.argv[1:]):
 
     peptides = pandas.read_csv(args.input_peptides).peptide.drop_duplicates()
     print("Filtering to valid peptides. Starting at: ", len(peptides))
-    peptides = peptides[peptides.str.match("[ACDEFGHIKLMNPQRSTVWY]+")]
+    peptides = peptides[peptides.str.match("^[ACDEFGHIKLMNPQRSTVWY]+$")]
     print("Filtered to: ", len(peptides))
     peptides = peptides.unique()
     num_peptides = len(peptides)