Fixes nil context errors
Merge pull request #9 from pj4533/master

Fixes nil context errors