fix bug with NPC picking up items crashing server