Fix escaping rules