bug fix for tmpl view