fix crash on autosave #369