diff --git a/src/Entity/Flag.php b/src/Entity/Flag.php
index 43578d6..2566a32 100644
--- a/src/Entity/Flag.php
+++ b/src/Entity/Flag.php
@@ -275,7 +275,7 @@ class Flag extends ConfigEntityBundleBase implements FlagInterface {
 
     // Select by user if the flag is not global.
     if (!$this->isGlobal()) {
-      $query = $query->condition('uid', $account->id());
+      $query->condition('uid', $account->id());
     }
 
     // Execute the query.
diff --git a/src/FlagService.php b/src/FlagService.php
index a2bd9c8..8040079 100644
--- a/src/FlagService.php
+++ b/src/FlagService.php
@@ -135,19 +135,19 @@ class FlagService implements FlagServiceInterface {
 
     // The user is supplied with a flag that is not global.
     if (!empty($account) && !empty($flag) && !$flag->isGlobal()) {
-      $query = $query->condition('uid', $account->id());
+      $query->condition('uid', $account->id());
     }
 
     // The user is supplied but the flag is not.
     if (!empty($account) && empty($flag)) {
-       $query = $query->condition('uid', $account->id());
+       $query->condition('uid', $account->id());
     }
     if (!empty($flag)) {
-      $query = $query->condition('flag_id', $flag->id());
+      $query->condition('flag_id', $flag->id());
     }
 
     if (!empty($entity)) {
-      $query = $query->condition('entity_type', $entity->getEntityTypeId())
+      $query->condition('entity_type', $entity->getEntityTypeId())
                      ->condition('entity_id', $entity->id());
     }
 
@@ -179,7 +179,7 @@ class FlagService implements FlagServiceInterface {
       ->condition('entity_id', $entity->id());
 
     if (!empty($flag)) {
-      $query = $query->condition('flag_id', $flag->id());
+      $query->condition('flag_id', $flag->id());
     }
 
     $ids = $query->execute();
