Made all templates utf-8 encoded and fixed two encoding bugs