diff --git a/src/Pyrite/Core/PDB.php b/src/Pyrite/Core/PDB.php
index <HASH>..<HASH> 100644
--- a/src/Pyrite/Core/PDB.php
+++ b/src/Pyrite/Core/PDB.php
@@ -459,7 +459,7 @@ class PDB
         $cols = array();
 
         if (!($tail instanceof PDBquery)) {
-            $tail = $db->query($tail, $tailArgs);
+            $tail = $this->query($tail, $tailArgs);
         };
 
         if (is_array($values)) {
Bugfix: how did this even get here?