fix some relation issues