fix db connect