Fixed a few errors in tables.sql