fixes in templates and evaluation