fix bug creating table