fix double-save