oops. Make sure $md exists...