bugfixes to the evaluation of the sparsity patterns for the atomic functions