fix test if key exists