fixed issue with removeSegments not removing correct index