Fix error in MD extension