Use the correct distance check for inside