Fixed some bugs in the card-shuffling behaviour