diff --git a/flippy.info.yml b/flippy.info.yml
index 0a631cd..5f4e91b 100644
--- a/flippy.info.yml
+++ b/flippy.info.yml
@@ -2,4 +2,4 @@ name: Flippy
 core: 8.x
 description: Allows administrators to define custom pagers for navigation in lists of nodes.
 type: module
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^8 || ^9 || 10
diff --git a/src/FlippyEvent.php b/src/FlippyEvent.php
index 1fd8b4a..d151b5d 100644
--- a/src/FlippyEvent.php
+++ b/src/FlippyEvent.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\flippy;
 
-use Symfony\Component\EventDispatcher\Event;
+use Symfony\Contracts\EventDispatcher\Event;
 use Drupal\node\NodeInterface;
 
 /**
diff --git a/src/FlippyPager.php b/src/FlippyPager.php
index 3f4c226..de9e3a2 100644
--- a/src/FlippyPager.php
+++ b/src/FlippyPager.php
@@ -172,7 +172,8 @@ class FlippyPager {
 
       // Create a starting-point EntityQuery object.
       $query = $this->entityTypeManager->getStorage('node')->getQuery();
-      $query->condition('type', $node->getType())
+      $query->accessCheck(TRUE)
+        ->condition('type', $node->getType())
         ->condition('status', 1)
         ->condition('langcode', $this->languageManager->getCurrentLanguage()->getId())
         ->condition('nid', $node->id(), '!=')
@@ -305,7 +306,7 @@ class FlippyPager {
         'last' => $last,
       ];
       $event = new FlippyEvent($queries, $node);
-      $this->eventDispatcher->dispatch('buildFlippyQuery', $event);
+      $this->eventDispatcher->dispatch($event, 'buildFlippyQuery');
       $queries = $event->getQueries();
 
       // Execute the queries.
@@ -350,7 +351,8 @@ class FlippyPager {
       // But only if we actually found some matches.
       if (count($node_ids) > 0) {
         // We also need titles to go with our node ids.
-        $title_query = $this->connection->select('node_field_data', 'nfd')
+        $title_query = $this->connection
+          ->select('node_field_data', 'nfd')
           ->fields('nfd', ['title', 'nid'])
           ->condition('nfd.nid', $node_ids, 'IN')
           ->execute()
@@ -373,7 +375,8 @@ class FlippyPager {
         $random_nid = array_rand($random_nids, 1);
 
         // Find out the node title.
-        $title = $this->connection->select('node_field_data', 'nfd')
+        $title = $this->connection
+          ->select('node_field_data', 'nfd')
           ->fields('nfd', ['title'])
           ->condition('nfd.nid', $random_nid, '=')
           ->execute()
