Distance to object got to be >= 25
Fixed the if bug