(cherry picked from commit 6bc276383cd1d63ac664ed7d03cd93397ddb50e5) (cherry picked from commit 3b478388)