fixed a big bug in the old model's saveAs function