Fixing table creation