backport efe33c508e140c595a2020ceff4f5a3f4006d9c1