improve patches due to upstream changes