Fixed autosave bug