Fixed autosave feature... ready to merge