Fix automated build script