Make the template valid.