Fixed bug in naming templates.