Fixing bug for resetting the button