Fixed bug in Tpl module