template engine fix

template engine fix