diff --git a/inc_haproxy_cfg.sh b/inc_haproxy_cfg.sh
old mode 100644
new mode 100755
index 9fe049d9b59bd3b9f8175f63ad6fa2a092ca562e..8aea4a43bf57e13cc7e8bf5022fa68623a139903
--- a/inc_haproxy_cfg.sh
+++ b/inc_haproxy_cfg.sh
@@ -7,6 +7,7 @@
 # ----------------------------------------------------------------------
 # 2021-12-14  v1.0  <axel.hahn@iml.unibe.ch>  init
 # 2022-10-21  v1.1  <axel.hahn@unibe.ch>      remove grep: warning: stray \ before white space
+# 2023-06-09  v1.2  <axel.hahn@unibe.ch>      take first haproxy stats port on multiple binds
 # ======================================================================
 
 # full path to haproxy.cfg
@@ -140,8 +141,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://"