Fixed warning and template.