Fix propagation of options for distance functions