Fixed some bugs in SbS and SbSMatch.