propagated fixes from upstream