More fixes to md