fixed the button saving problem