Table sorting, column mapping fixes