fix db connect problem