Upstream merge

Merge in changes from the parent repo.