Inifinite loop fix on error
Merge pull request #3 from stauzs/master

Inifinite loop fix on error