fix compatibility with hasOne