diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php
index 91f790e6dedf55948d0069f9675c8b63a817e315..f5e28a0609f52d732338556139b238bf021f18e0 100644
--- a/interface/web/sites/web_vhost_domain_edit.php
+++ b/interface/web/sites/web_vhost_domain_edit.php
@@ -339,7 +339,7 @@ class page_action extends tform_actions {
 			if($app->functions->intval($this->dataRecord["server_id"]) > 0) {
 				// check if server is in client's servers or add it.
 				$chk_sid = explode(',', $client['web_servers']);
-				if(in_array($this->dataRecord["server_id"], $client['web_servers']) == false) {
+				if(in_array($this->dataRecord["server_id"], $chk_sid) == false) {
 					if($client['web_servers'] != '') $client['web_servers'] .= ',';
 					$client['web_servers'] .= $app->functions->intval($this->dataRecord["server_id"]);
 				}