fix conflict between realname, references, and references id trim