Fixed seg fault when creating the new table