Fixed bug when sampling from BernoulliMM.