WIP: fix various silly bugs with the gibbs sampler