fix the some problem when render tpl