The estimate_MI function in estimate_MI.m sometimes gets stuck in an infinite loop.
I was able to produce a workaround by adding a counter variable and restarting the function (with the exact same input parameters) when the loop runs for more than 10 times.