fix MD bug