Merge v1.7.x

This PR merges v1.7.x to upstream/master.