fixed errors in naive bayes.