Corrected condition when creating sparse matrix
peth now ueses sparse matrices