Make MAX_DISTANCE static