Fixed resource collection loop.
Merge pull request #1 from parreirat/master

Fixed resource collection loop.