patch for bugs 27136 and 27629