Return after for loops to speed things up.