adding corrected sparsity usage
fix sparsity error