patch for saveAs()