logarithm domain bug fixed