fix adjust segments bug