Fixed some rendering issues with the table renderer. Note to self, this
code seriously needs some cleaning.