fixed disconnection bug