Fixing the database script to use the database after creating it