Various bugfixes to mutual information stuff