some small fixes, including escaping chars