Fix minor bug and changes
diff --git a/packages/devtools_app/lib/src/inspector/flutter/inspector_screen_details_tab.dart b/packages/devtools_app/lib/src/inspector/flutter/inspector_screen_details_tab.dart
index 22961e4..cf4b493 100644
--- a/packages/devtools_app/lib/src/inspector/flutter/inspector_screen_details_tab.dart
+++ b/packages/devtools_app/lib/src/inspector/flutter/inspector_screen_details_tab.dart
@@ -112,7 +112,10 @@
   }
 
   void onSelectionChanged() async {
-    if (!StoryOfYourFlexWidget.shouldDisplay(selected)) return;
+    if (!StoryOfYourFlexWidget.shouldDisplay(selected)) {
+      setState(() => root = null);
+      return;
+    }
     final shouldFetch =
         root?.dartDiagnosticRef?.id != getRoot(selected)?.dartDiagnosticRef?.id;
     if (shouldFetch) {
diff --git a/packages/devtools_app/lib/src/inspector/inspector_service.dart b/packages/devtools_app/lib/src/inspector/inspector_service.dart
index 40bcea8..50305a8 100644
--- a/packages/devtools_app/lib/src/inspector/inspector_service.dart
+++ b/packages/devtools_app/lib/src/inspector/inspector_service.dart
@@ -968,7 +968,7 @@
       }
       final result =  WidgetInspectorService.instance._nodeToJson(
         root,
-        _SerializationDelegate(
+        InspectorSerializationDelegate(
             groupName: '$groupName',
             summaryTree: false,
             subtreeDepth: $subtreeDepth,