Fix an error in database creation