Fix variable not being passed to template