fixed a bug in the aweful build.sh script which needs a good replacement