Correct samples counting output and unify tolerances.