Fixed bug in idf