Fix bug in unwatchKey function