Bug in template execution