correcting character escaping