Properly handling recursive sorting
Rebuild