Integrated upstream fixes.