need to fix bug in find seam.