fixing a nilpointer problem
Merge pull request #18 from timkettering/master

fixing a nilpointer problem