Fixes for build scripts