fix bayes rule