Sparse matrices bugs fixed.