(cherry picked from commit ab37e03bf34800a7780a653e998ad6f7a97f08f4)
(cherry picked from commit 2b527169f1f73574bcd5cb49e43ee87986f85996)
(cherry picked from commit 5fed32742e62315e0b0f483563f6f3f3e57af0fa)
(cherry picked from commit 861c05c2f308b0e7f4300b3f743830bb010588a3)
(cherry picked from commit fd0ebd1a6518b3b81f71c928a02903df655e5a74)