patch for 3.x