Fix log scaling extremum check