Bugfix to table creation