fixes in the tables

sorting, bugfixing, etc.