Activated old way of sorting tables (broken in the general case)