Adjust patch for upstream changes