Replace key with k in idf so that it will get the right k