Fixed minor issues in templates