upstream fixes