fix error use of unsaved