Fixed thread data race on error/result windows