Various table related fixes