fixed bug with incrementing card id