fixup cherry pick of ae69ee9a245b16c1fda55c0002448ad7a85e1387 to 2.1.x from master