Fix logarithmic bug.