added patch for SF bug #1297