Patch for bug 47