(cherry picked from commit 9cd0b93ad243f05e7dd17055782ac922dc91b6f0)
(cherry picked from commit 430f7d651902ab1e3e44ae27d9821d9132ee8a63) (cherry picked from commit b33f3e2fe82d1e8d5368024938333e6a8c907e76)