Update template variable syntax and correct template rendering. (#432)