Fix a bug in escape sequence handling.