some fixes brought in from the release branch.