diff --git a/proxy/index.php b/proxy/index.php
index d4eb109..be6c79d 100755
--- a/proxy/index.php
+++ b/proxy/index.php
@@ -19,17 +19,11 @@ function PopupG(apri)
= DATE_SUB(NOW(), INTERVAL 1 $tempo) GROUP BY ip";
$res = mysql_query( $query, $DB_ID );
-$valori = mysql_fetch_array ( $res );
-$max = $valori['max'];
+$max = 0;
+while ($valori = mysql_fetch_array ( $res )) {
+ if ($valori['max'] > $max) {
+ $max = $valori['max'];
+ }
+}
$query = " SELECT
proxy_pool.attivo,