More robust threading

Thanks for the clarification. This helps a lot.