Error resolved, infinite loop with list of teams