fixed loading errors with database creation