Patch for bug 1043924 and filed bug 1045671