[Bug Fix] Fix NPE as per #65. thanks saladoc.