fixed bugs and print TableModel