build script fixes