restore state of the button on save