fix string length constraint check