fixed thread exiting on join() call