fixed save bug on button action