(cherry picked from commit 87138718549bdec014752ba43dcd5997aaf29137)
(cherry picked from commit 29ac94d1fe52e666fda619f8716d2bc0b120a9ee)
(cherry picked from commit a9aaa40ec48a75967882ef95951bf4f7fccf7a9d)