(cherry picked from commit 5593e28)
(cherry picked from commit b18aecf)
(cherry picked from commit 2047d3f)