Fix an IndexOutOfRange exception. 

This occurs when the string it bugger then the max allowed length (which is 128) of the string that contains the highlighted word/s.