test table and fix errors