fix table creation