Fixes for dm