Fix UNKNOWN exit code in templates.