Allow union sort

Compile union sorting.