Fix for characters without alliances; tests