New version for error in templates