Fix npc handler

The npc system should be rewritten sometime.