Fix handling of #dm.