further fixes in templates