Bugfixes: key in hashmap and for key in hashmap