Patch for bug 965291