Fixes #1

Invalid argument supplied for foreach() fixed
Merge pull request #2 from yepes/master

Fixes #1