Fixed button state issue