fixed issue with random card generation