fix issues with empty buckets