diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index dc31976fa3b6fbe684715ae4f588cfa57c8a3ef3..205e0fa6fca64379374d2e0a1eb0f8b4af90fa1e 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -63,7 +63,7 @@ class remoting {
 			return false;
 		}
 		
-		$session_id = $app->db->quote($session_id);
+		$session_id = $this->app->db->quote($session_id);
 		
 		$sql = "DELETE FROM remote_session WHERE remote_session = '$session_id'";
 		$this->app->db->query($sql);