error corection in template
templates