Port changes for #411 from 1.7 to master.