escape tests and fixes