(cherry picked from commit ca86d740)
(cherry picked from commit 4fa2427e)
(cherry picked from commit 01470b39)