Fixed sorting of table columns