fix string length matching