tpl: fixed bug with include, unit tests updated