Minor fixes in templates