fix in template bug