Fix calls to compute_distance