ML_stable function

Prevents algorithm to end up in ill-defined likelihood