backport changes from performing diff of 2.3->2.4