Fix bug about string length