Merge the changes in 2.7.1 upstream to master.