fix bug in max ext and dist and trim to 80 chars