diff --git a/modules/core/lib/Storage/SQLPermanentStorage.php b/modules/core/lib/Storage/SQLPermanentStorage.php
index 69a85946ca52827611b074884c0db423c80f638e..d1f5f2c96265b826591194ebe41ad0da7816caa7 100644
--- a/modules/core/lib/Storage/SQLPermanentStorage.php
+++ b/modules/core/lib/Storage/SQLPermanentStorage.php
@@ -152,7 +152,7 @@ class sspmod_core_Storage_SQLPermanentStorage {
 	public function removeExpired() {
 		$query = "DELETE FROM data WHERE expire NOT NULL AND expire < " . time();
 		$this->db->arrayQuery($query, SQLITE_ASSOC);
-		$changes = $this->db>changes;
+		$changes = $this->db->changes();
 		return $changes;
 	}