Fix IDF caculation