fix escape character bugs