Fix exception in yid management