Fix for NullReferenceException
Merge pull request #21 from jFensch/master

Fix for NullReferenceException