fix infinite loop problem at jvm
Merge pull request #87 from sekiguchi-nagisa/master

fix infinite loop problem at jvm