updated to upstream v3.1.1
Merge branch 'upstream' at v3.1.1