Fixes for build script