Fix tolerance computation