Small fix to prevent nul pointer exceptions
Merge pull request #11 from svanharmelen/dev

Small fix to prevent nul pointer exceptions