re-order disconnect handling