be less silly, bug was in link.toJSON()