Fixed a bug that messed up the tables.