Fixed a problem when running multipe buckets.