Bug fixing

- Fixed escaping lost when using lambdas (escaping information was lost when using lambdas)
- Fixed encoding of unicode surrogates