(slightly) better disconnect handling