fixing of table sort