Fixing concurrent bug in naive bayes indexes