fixed utf-8 encoding of templates