Fix disconnect order.