Fixed bug in autosave.