Fix #15 escape characters are not correctly generated in old escape mode