fix bug for missing tpl files