(cherry picked from commit b5b7eb6b95b5e2c741ba5c7ce0192d966e1d1fec)
(cherry picked from commit 746f67b100d1fa16faeae07acceef4e7ff0ce24b)
(cherry picked from commit 6e9b4ef610be7480aa54e5740a5149ecc71b2969)