Updated d-t-m with bugfix