(cherry picked from commit 29ac94d1fe52e666fda619f8716d2bc0b120a9ee)
(cherry picked from commit a9aaa40ec48a75967882ef95951bf4f7fccf7a9d)
(cherry picked from commit 7306bf031f8bc07168197c00e332bf89c8d611dd)