diff --git a/make.sh b/make.sh
index 78342a4e935b9986bb5cc1d85ef95e2404491d78..ceba6df41c6656025bfa44bb1c386d66935783b8 100755
--- a/make.sh
+++ b/make.sh
@@ -37,7 +37,7 @@ apt update -qqq
 apt install -yqqq build-essential dpkg-dev debhelper build-essential libssl-dev uuid-dev libseccomp-dev pkg-config squashfs-tools cryptsetup wget curl git devscripts dh-golang
 
 # Automaticka detekce posledni releasnute verze
-SINVERSION=${SINVERSION:-$(curl -s https://github.com/sylabs/singularity/releases/latest | grep -Po "\/v\K[^\"]+")}
+SINVERSION=${SINVERSION:-$(curl -L -s https://github.com/sylabs/singularity/releases/latest | grep -Po "\/v\K[^\"]+" | head -1 | grep -Po "\d+\.\d+\.\d+"}
 GOVERSION=${GOVERSION:-$(curl -s https://go.dev/VERSION?m=text)}
 
 # Priprava adresare pro hotove balicky a zapamatovani cesty