fix a set bug in sparse matrix adt