Merge pull request #7 from kyohei-nakamura/fix-npe

Fix npe