read_stan_samples: fix bug if niter == 1