Fix thread bug for error handling