diff --git a/src/Plugin/EntityBrowser/Widget/THRONSearch.php b/src/Plugin/EntityBrowser/Widget/THRONSearch.php
index 2dc3be2..11943ae 100644
--- a/src/Plugin/EntityBrowser/Widget/THRONSearch.php
+++ b/src/Plugin/EntityBrowser/Widget/THRONSearch.php
@@ -1005,12 +1005,12 @@ class THRONSearch extends THRONWidgetBase {
     $selected_entities = array_merge($selected_entities, $entities);
 
     $this->eventDispatcher->dispatch(
-      Events::SELECTED,
       new EntitySelectionEvent(
         $this->configuration['entity_browser_id'],
         $form_state->get(['entity_browser', 'instance_uuid']),
         $entities
-      ));
+      ),
+      Events::SELECTED);
   }
 
   /**
diff --git a/thron.install b/thron.install
index eb11c6f..463bd05 100644
--- a/thron.install
+++ b/thron.install
@@ -1,5 +1,6 @@
 <?php
 
+use Drupal\Core\Entity\EntityStorageException;
 use Drupal\file\Entity\File;
 use Drupal\thron\THRONApi;
 
@@ -24,7 +25,7 @@ function thron_uninstall() {
     $thron_medias = $media_storage->loadMultiple($thron_medias);
     try {
       $media_storage->delete($thron_medias);
-    } catch (\Drupal\Core\Entity\EntityStorageException $e) {
+    } catch (EntityStorageException $e) {
       \Drupal::logger('thron')->error($e->getMessage());
     }
   }
