Fix threshold when filtering on negative distances