fix bug of parse segment to scan