small fixes to tpl