endless loop fix in facebook iterator