keyExists has problems