Tpl improvement, bug correction