Fixed bucket id calculation