fix patch for bug 787985