table creation bug fix