For upstream patch