fix bugs in sffs1 and sffs2