repairing brokent references