Fix invalid button states.