fix db entities