MaxDistance for bounce

Trying to revert to first version