++
diff --git a/scripts/download.sh b/scripts/download.sh
index f25eb2d..61e351c 100755
--- a/scripts/download.sh
+++ b/scripts/download.sh
@@ -76,7 +76,8 @@
 	    else
 		# git clone $1 $2
 		# git checkout $3
-		git clone --branch $3 --single-branch $1 $2
+        { git clone --branch $3 --single-branch $1 $2; } || \
+            { git clone $1 $2 && git -C $2 checkout $3; }
 	    fi
 	else
             git clone --depth 1 $1 $2