Merge latest 1.6 changes from upstream