fixes total string length comparison