fix(main): Fix autosave bug