Fix dm.order/dm.dx implementation.