Fix disconnect after exiting connecting