Fix maxDiff bug in unittest suite