fixed issue with iri <-> legacy id conversion