Fix iteration error