Fixed NPE.
Merge pull request #57 from iuj/master

Fixed NPE.