Fix for null issue

This just checks that the match is true.  Is should fix issue #1, I should do some more testing.  I tested it on my atom app and it seems to be working.