Added fix to hasOne relationship