Fixed bug where non existing thread had to join