Fix sort order of table