(cherry picked from commit ee15d631)
(cherry picked from commit bd013e1d)
(cherry picked from commit 1e8884bc)