template-bug fixed