fix internal references