Fixed a bug with table sorting on empty data.