(cherry picked from commit a6d31e8)