Fixed issues with the build scripts