diff --git a/bilby/core/sampler/base_sampler.py b/bilby/core/sampler/base_sampler.py
index 2abb4b3a7552adc88b6bf48e4899345cf6e50168..4b5cc048f484f81ce90cb00c62ac23b1cadef917 100644
--- a/bilby/core/sampler/base_sampler.py
+++ b/bilby/core/sampler/base_sampler.py
@@ -310,7 +310,7 @@ class Sampler(object):
         for _ in range(n_evaluations):
             if isinstance(self.priors, ConditionalPriorDict):
                 theta = self.priors.sample()
-                theta = list(theta.values())
+                theta = [theta[key] for key in self._search_parameter_keys]
             else:
                 theta = [self.priors[key].sample()
                          for key in self._search_parameter_keys]