a few fixes to the build script