fix alg in tfidf