Fixed index out of bounds for unicode code points