fix db assign