Fixed an iteration error