fix testament check code for .dm