fix haveInDatabase function

There is error in binding cycle. You can't use keys because keys are string.
Merge pull request #269 from TrustNik/master

fix haveInDatabase function