fixed minor bug in npc update