make sure that the segment index is initialized