wrote a patch for bug 865871