solve a bug of string length