Small fixes in templates