fixed stupid bug in card matching code