small changes to fix TfIdf