Negative shard index fix