Don't iterate longer than necessary
Merge pull request #16 from bquorning/performance

Performance