Fix "legend" in various templates.