Fix overflow from buckets array