fixing reconnection to DB on options change