fix self id assignment