fix bugs that tf-idf error