Fix the shortest segment processing
Coming from the number of datapoints, we may have a tiny error in its processing