Fix errcheck in templates.