added key check and replaced duplicate answer
Merge pull request #16 from cleentfaar/small-fixes

Added key check and replaced duplicate answer