fix bayes training