Fixed minor bug in related template.