corrected allocation of dftmp