small fixes in templates