fix NDFS

sparse matrix