Fix variables in template