Fixed #42, Invalid argument supplied for foreach...
Merge branch 'hotfix#42'
Fixed Invalid argument supplied for foreach