fixed the download phase bugs of build.sh