cherry-pick 718f96b206d52fee29c2d62ecff5628d9ca669e3