cherry-pick 81ef80c4d9