Cherry pick from trivial-fixes to reduce the size of the merge