Fixed disconnection bug