socket disconnect bug solved