#1025 fixing derivative sparsity