diff --git a/inc_haproxy_cfg.sh b/inc_haproxy_cfg.sh
old mode 100644
new mode 100755
index 9fe049d9b59bd3b9f8175f63ad6fa2a092ca562e..af5e1d96da529232610f6e3e582e9f66fdc67e03
--- a/inc_haproxy_cfg.sh
+++ b/inc_haproxy_cfg.sh
@@ -140,8 +140,8 @@ function getStatsBaseUrl(){
     local mysection=$( detectStatsSection )
 
     # read config
-    port=$( getCfgVar "bind"  "${mysection}" | cut -f 2 -d ":")
-    auth=$( getCfgVar "stats" "${mysection}" | grep "^auth" | cut -f 2- -d " " )
+    port=$( getCfgVar "bind"  "${mysection}" | cut -f 2 -d ":" | head -1 )
+    auth=$( getCfgVar "stats" "${mysection}" | grep "^auth" | cut -f 2- -d " " | head -1 )
 
     # build url
     url="$proto://"