fix bug duplicate controls block in template
added api