Fixed NBO distance calculation.