Merge v1.7.x

This PR merges the latest v1.7.x with upstream/master.