fix sos logical error.

fix sos logical error.