Fixed the new threading problem