Port some things from 4.2.2