Fixed if clause in tmpl