Fix a bug in template: too wide error span.