thread fixes