Merge master branch into v3.1 branch