more static build script fixes