fixed sfs due to bad logic