Upstream changes from master

Upstream changes from master branch.