diff --git a/www/install/php/Update-2.8.19_to_2.8.20.php b/www/install/php/Update-2.8.19_to_2.8.20.php
index 63608025fcb77ca8b3961100cce0b30f53d0bc3a..aea5f32a491ef92549e4c4312abe42811aac6781 100644
--- a/www/install/php/Update-2.8.19_to_2.8.20.php
+++ b/www/install/php/Update-2.8.19_to_2.8.20.php
@@ -36,9 +36,9 @@
 
 /* Set default poller with localhost if it is not set */
 if (isset($pearDB)) {
-    $res = $this->db->query("SELECT `name` FROM `nagios_server` WHERE `is_default` = 1");
+    $res = $pearDB->query("SELECT `name` FROM `nagios_server` WHERE `is_default` = 1");
 
     if( $res->rowCount() == 0) {
-        $res = $this->db->query("UPDATE `nagios_server` SET `is_default` = 1 WHERE `localhost` = '1'");
+        $res = $pearDB->query("UPDATE `nagios_server` SET `is_default` = 1 WHERE `localhost` = '1'");
     }
 }