MGI update

various fixes.