now allowing database.connect to be called multiple times gracefully