Fix formspec handling and trade npc bug