minimal fixes in templates