fix table sort