fix self-assign issues in NPC