change the way the database reconnects