Fix button bug with transitions