fixes multiple rids