Fixed bug with deadlock joining.