fix distance in the truth table