Add recent changes from 1.7 into master