Fix for infinite loop
Merge pull request #6 from l-sora/master

Fix for infinite loop