Fix some bugs with the tribe/NPC saving and loading