build.sh fix on redirect