Fix thread bug for error handling

No match.