fix db connections