Fixing zero-indexing on ranking