bug fix in segscan