Fix bugs in button and table, and add tests.