fix segment_separator and branch char bugs