bug fix for md