make match safe
Merge pull request #14 from davidchambers/match

make match safe