logarithm fix