bugfix for self-referential links based on events file