fix up self ref paths