Make more reasonable distance detection