fix tpl variable bug