Fix looping mistake.