Backport dc8424046273c1fdf0aeafa6de7b2f70c93a0283