fix setting roles.
beautify .tpl-files