fix bad card type comparison