fixes issue #125
unit test for issue #125
Merge pull request #149 from jeremyquinton/125

Fixes #125 by using array_key_exists instead of isset