fixed bug on counting cards