Removed usage of has_key

It's deprecated
Merge pull request #2 from alex/patch-1

Removed usage of has_key