Committed Johnny's patch for bug #242966