Small threading fix