Modified Minimum distance to return zeros if empty list given