Don't iterate longer than necessary