fixed last end for log probability infinity.