Fixed freeDTM runtime error