more CMI and build script fixes