Fix error in MD conversion