Naive bayes learning bug fixed