fixing template variables