Imported from master branch.