Fixed bug in call to getItem using first argument as return value instead of second

The console log was showing the error value instead of the value of the key being looked up!
Merge pull request #305 from coolbloke1324/master

Fixed bug in call to getItem using first argument as return value