some fixing in updateDEK method, some debug printing