fix db adapter