minor fixes in templates