fix segment issue