avoid infinite loop problem

- Fix #1

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Merge pull request #3 from miurahr/fix_infinite_loop

avoid infinite loop problem