Fix sort order of table fields