Fix maxDifferent for Mac