diff --git a/core/DataAccess/ArchiveSelector.php b/core/DataAccess/ArchiveSelector.php
index a89638f9644e108a708b703e58f3c92225b69269..8011924b0c4719f8cdffc1f78cbe7a927a72123f 100644
--- a/core/DataAccess/ArchiveSelector.php
+++ b/core/DataAccess/ArchiveSelector.php
@@ -171,7 +171,7 @@ class ArchiveSelector
         foreach ($monthToPeriods as $table => $periods) {
             $firstPeriod = reset($periods);
 
-            $bind = $siteIds;
+            $bind = array_values($siteIds);
 
             if ($firstPeriod instanceof Range) {
                 $dateCondition = "period = ? AND date1 = ? AND date2 = ?";
diff --git a/core/DataAccess/Model.php b/core/DataAccess/Model.php
index 6e072bf1bc40b1f3bbcd680521135aaa65811aa9..0e4b2845a7cf61a8632de02450a63c4f9585d014 100644
--- a/core/DataAccess/Model.php
+++ b/core/DataAccess/Model.php
@@ -37,6 +37,7 @@ class Model
         // prevent error 'The SELECT would examine more than MAX_JOIN_SIZE rows'
         Db::get()->query('SET SQL_BIG_SELECTS=1');
 
+        $idSites = array_values($idSites);
         $idSitesString = Common::getSqlStringFieldsArray($idSites);
 
         $query = 'SELECT t1.idarchive FROM `' . $archiveTable . '` t1
@@ -82,7 +83,7 @@ class Model
         }
         $sql = implode(" OR ", $sql);
 
-
+        $idSites = array_values($idSites);
         $sqlSites = " AND idsite IN (" . Common::getSqlStringFieldsArray($idSites) . ")";
         $bind = array_merge($bind, $idSites);
 
@@ -128,6 +129,7 @@ class Model
 
     public function deleteArchiveIds($numericTable, $blobTable, $idsToDelete)
     {
+        $idsToDelete = array_values($idsToDelete);
         $query = "DELETE FROM %s WHERE idarchive IN (" . Common::getSqlStringFieldsArray($idsToDelete) . ")";
 
         Db::query(sprintf($query, $numericTable), $idsToDelete);
diff --git a/plugins/CustomAlerts b/plugins/CustomAlerts
index 8d6dd8428317c24e997f335f27f1d3fb522c1935..e886aa43f4c248bf6aaeeef05885f4acdf190a82 160000
--- a/plugins/CustomAlerts
+++ b/plugins/CustomAlerts
@@ -1 +1 @@
-Subproject commit 8d6dd8428317c24e997f335f27f1d3fb522c1935
+Subproject commit e886aa43f4c248bf6aaeeef05885f4acdf190a82
diff --git a/plugins/QueuedTracking b/plugins/QueuedTracking
index f73280a649974a2b0882f1606f732057cee50dc5..bad46dc2a021edf239fe603b40dfcf8532e5712f 160000
--- a/plugins/QueuedTracking
+++ b/plugins/QueuedTracking
@@ -1 +1 @@
-Subproject commit f73280a649974a2b0882f1606f732057cee50dc5
+Subproject commit bad46dc2a021edf239fe603b40dfcf8532e5712f
diff --git a/tests/PHPUnit/UI b/tests/PHPUnit/UI
index 4cdf80fc99025b71e5d8e59419d2af749e466df6..3c3fe985f1af4f1d897d6c1551057124fd6bffa4 160000
--- a/tests/PHPUnit/UI
+++ b/tests/PHPUnit/UI
@@ -1 +1 @@
-Subproject commit 4cdf80fc99025b71e5d8e59419d2af749e466df6
+Subproject commit 3c3fe985f1af4f1d897d6c1551057124fd6bffa4