Bucket number generator fix