Fixed a bug in string length comparison