Added a return value on the next method when iterating.