Fix #281: Fix sampler failure when n_samples = 1
#489
+13
−1
n_samples = 1
#489