modify a bug of BucketWriter