What are you trying to do with "break;"? Stop the loop completely or skip the current value and continue on?
What i'm trying to do is not make the loop override the total amount of factions, if it does it will break the loop, even trying to remove that, the problem still occurs.