Fix a bug when trying to disable autosave