fix random card selection
add check for empty deck