SPP Optimisation.

Altered if statement for the distance/range comparison.