Patched table sorting