fixed template escaping