distance_matrix_worker bug fixes