Fixed crash if log value is very close to the linear value