Fixed bug when unitialized threads are tested for valid