Bugfix: sorting table made it malfunction