fix error passing to template