Cherry-pick 68a31177aa3741f6d921f73fa22d5ea591ba452f