template engine token fix