Fixed a few bugs caused by improperly reusing table cells.