fixed bug in bayes network