MD: some fixes