Fix the core to check number of buckets