tmbg: added some hackish escaping