fixed an issue in handling empty shards (these might happen in triangle counting as edges are deleted