fix tables

Work with sortCard array.
Warning! Id in checkUniq isn't right.