correct a bug on save revised
working on state management