fix db connect at restart