Various fixes to MCMC module