Patch for bug 1150