diff --git a/mhcflurry/class1_affinity_predictor.py b/mhcflurry/class1_affinity_predictor.py
index 1bbefd41561cac5df54208050c5309f12ad90047..fa2023eb9e8f661b3d31b78ce25f735bbb2aa505 100644
--- a/mhcflurry/class1_affinity_predictor.py
+++ b/mhcflurry/class1_affinity_predictor.py
@@ -933,7 +933,7 @@ class Class1AffinityPredictor(object):
         encoded_peptides = EncodableSequences.create(peptides)
 
         for (i, allele) in enumerate(alleles):
-            predictions = self.predict(peptides, allele=allele)
+            predictions = self.predict(encoded_peptides, allele=allele)
             transform = PercentRankTransform()
             transform.fit(predictions, bins=bins)
             self.allele_to_percent_rank_transform[allele] = transform
diff --git a/mhcflurry/train_allele_specific_models_command.py b/mhcflurry/train_allele_specific_models_command.py
index 87fe6b019f2b3add80615fee68671aa50051904e..3d72b32a1a50ea5df3b0abf4533ce74dd05f394a 100644
--- a/mhcflurry/train_allele_specific_models_command.py
+++ b/mhcflurry/train_allele_specific_models_command.py
@@ -9,6 +9,7 @@ import time
 import traceback
 from multiprocessing import Pool
 from functools import partial
+from pprint import pprint
 
 import pandas
 import yaml
@@ -363,7 +364,7 @@ def train_model(
         # For the first model for the first allele, print the architecture.
         print("*** HYPERPARAMETER SET %d***" %
               (hyperparameter_set_num + 1))
-        print(hyperparameters)
+        pprint(hyperparameters)
         print("*** ARCHITECTURE FOR HYPERPARAMETER SET %d***" %
               (hyperparameter_set_num + 1))
         model.network(borrow=True).summary()