Fixed never ending iteration.