(cherry picked from commit cad5b4d7deba4fbe4a40a17306ce49d3b2f13139)
(cherry picked from commit c2c89a423ffffc06fb43c86d4714bb32d1936c3e)
(cherry picked from commit 24422b216a15319d90799d4f8f54453c8efd5c34)