Fixed bug with duplicate buckets