Fixed some small bugs with DM.