fixed memleak @tpl-engine