fixed tfidf bugs