Fixed variable reference in template