Fixed refactoring

- final state comes from the fact whether it was possble to save the config