resolve merge conflicts from cherry picking 640e43681b3ef2dab2cf86633a74b6ef947dc9fe