fix self refs