fixes to build.sh