fix double sumsegscan problem