Fix error in sparse tests