fixed autosave

Fixed up the autosave method