fixed npc_reallocate, fixed npc_remove