Fixed bug in the database creation.