patch before update