fix gibbs sampler