Fixing logic in the tasks regarding alliances