fixed a bug in indexOfOmitChars