more minor fixes in templates