Fixing database creation