fix autosave issue