diff --git a/html/user/team.inc b/html/user/team.inc
index 4b03d7f8c1..be1ab68e0b 100644
--- a/html/user/team.inc
+++ b/html/user/team.inc
@@ -144,7 +144,7 @@ function user_join_team($team, $user) {
$first_team = mysql_fetch_object($result_team_other);
$first_nusers = $first_team->nusers;
$first_new_nusers = $first_nusers - 1;
- if ($first_new_nusers) {
+ if ($first_new_nusers > 0) {
$query_team_table_other = sprintf(
"update team set nusers = %d where id = %d",
$first_new_nusers,
diff --git a/html/user/team_quit_action.php b/html/user/team_quit_action.php
index 2a3b0adbc4..4c746440b7 100644
--- a/html/user/team_quit_action.php
+++ b/html/user/team_quit_action.php
@@ -22,7 +22,7 @@
$result_user_table = mysql_query($query_user_table);
$nusers = $team->nusers;
$new_nusers = $nusers - 1;
- if ($new_nusers) {
+ if ($new_nusers > 0) {
$query_team_table = sprintf(
"update team set nusers = %d where id = %d",
$new_nusers,