fix table definitions