Removed "PTHREADS_ALLOW_GLOBALS", disconnection bug fixed