close on autosave and minor bug fix.