Fixed encoding problems: considering template files in UTF-8