diff --git a/bilby/core/prior.py b/bilby/core/prior.py
index c9749e944733c22d1cda011d3bc81142512d6811..1950e61a3f747d6801d3ee489c56f0a688b6d37e 100644
--- a/bilby/core/prior.py
+++ b/bilby/core/prior.py
@@ -2120,16 +2120,15 @@ class MultivariateGaussian(object):
         """
 
         # samples drawn from unit variance uncorrelated multivariate Gaussian
-        inbound = False
-
         samps = np.zeros((size, len(self)))
         for i in range(size):
+            inbound = False
             while not inbound:
                 # sample the multivariate Gaussian keys
                 vals = np.random.uniform(0, 1, len(self))
 
                 samp = self.rescale(vals, mode=mode)
-                samps[:, j] = samp
+                samps[i, :] = samp
 
                 # check sample is in bounds (otherwise perform another draw)
                 outbound = False