Integrated upstream fixes