fixes disconnection issues