fix bug and tpl render