Patch for an Issue #997