fix NPE while handling shard failures of a distributed collect