Patch for bug #42