merge upstream fixes