Build profile list before processing the item list.
Merge pull request #3 from faceleg/feature/fix-profiles

Build profile list before processing the item list.