fix to template file bug
