Add default value to minBuckets
Fix duplicate sort specs