Patch for bug 46