fixing Key#equals(Object) implementation