Fixing variables in templates