CW-508 - Fixed issue with empty the card SQL exception