Added code for if a key is used as a value