fix hasOne relations