Fixed bug when creating table through database class.