Apply missing commits from 1.9 branch to 2.3

Reviewer: @aogilvie