Fix variable in template to match template code