Fixed bug in Gibbs sampling part 1