Fix likelihood calculation.