fixed autosave bug