Fix #334
Merge pull request #334 from bouzuya/cannot-read-property-0-of-null

TypeError: Cannot read property 0 of null