Fixed isUnsaved method