Why is the segment size not giving the correct value when the 'between' operator is used?