(cherry picked from commit 7ead5bf8b5)
(cherry picked from commit 0bb54f8b11)
(cherry picked from commit 1382887d9c)