fix string-begins-with not to address out of bounds