Fixed bug in word finding for keys