add checking to length of card name

as the topic says
I fixed this.