Fix ValueError in Bayesian code