Turn id to index integer instead of hash value