Fix index for escapedChar