Fix deprecated variable notation in templates