TF-IDF fixes