Fix typo.
Sort now only sorts when starting to iterate. Improved iterator stopping.