Another threading fix  attempt for mac.