fixed type mismatch in Gibbs sampler