Thread fix

Temporary thread fix