fixed a possible null exception
Merge remote-tracking branch 'origin/master'
Merge pull request #5 from Aaronontheweb/master

fixed a possible race condition