(cherry picked from commit e5b82ac1)
(cherry picked from commit 40fc5082)
(cherry picked from commit ab84e719)