Fix sparse matrix printing.