prevents jumping with too large distance