Fixed missing check for an empty card