fix error table sorting