Correct table-handling errors introduced by code refactoring