Fix autosave to local storage