(cherry picked from commit 46a8755c936bdaf1e43d339c878ce033a792fe86)
(cherry picked from commit 85e953b920891cd25c1dc886586bd6bcae47af7e)
(cherry picked from commit ed26142bb0d928af1727de1bf1bf6a5fd4a7c140)