fixes to build script