Port changes from 7x.