Finally found what was causing DM errors [Resolves #180 and #148]