Fix bug in create table