Performance improvements (set the number of buckets and make sure they are availiable)