Fixed summarize bug
Fixed first segment could be backward issue