Fix bugs in new action "numeric-calculate-distances-scaled"